var p = new Promise((resolved, rejected) =>{
  setTimeout(()=>{
    let a = 'ok'
    resolved(a)
  },2000)
})

p.then((data)=>{
  console.log(data)
})